package com.intelligence.controller;

import com.intelligence.common.system.AuthContextUtil;
import com.intelligence.entity.pojo.SysPermission;
import com.intelligence.entity.pojo.SysUser;
import com.intelligence.entity.result.Result;
import com.intelligence.entity.vo.SysMenuVo;
import com.intelligence.service.SysPermissionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author : RulerWood
 * @Data : 2024/5/15 - 20:50
 */
@Tag(name = "菜单管理")
@RestController
@RequestMapping("/intelligence-user/permission")
public class PermissionController {

    @Autowired
    private SysPermissionService sysPermissionService;

    /**
     * 动态菜单
     * @return
     */
    @GetMapping("/findNodes")
    @Operation(summary = "动态菜单")
    public Result<List<SysMenuVo>> findNodes() {
        return sysPermissionService.findNodes();
    }


}
